<template>
  <div class="app">
    <h1>app---{{ msg }}</h1>
    <Child></Child>
    <Child
      :msg="msg"
      @click="getSonData"
    ></Child>
  </div>
</template>
<script>
import Child from './Child.vue'
export default {
  data() {
    return {
      msg: '父组件的数据'
    }
  },
  methods: {
    getSonData(data) {
      console.log(data)
      // this.msg = data
    }
  },
  components: {
    Child
  }
}
</script>
<style lang="scss" scoped></style>
